<ui:composition template="../index/index.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:define name="content">

		<h:form>

			<p:fieldset legend="Requisição de Pagamento de Salário ou Conta">

				<h:panelGrid columns="2" cellpadding="10">
					
					<h:outputLabel value="Tipo de Conta: " />
					<h:selectOneMenu id="tipoContaPagar"
						value="#{requisicaoTransferenciaBean.tipoContaPagar}">
						<f:selectItem itemLabel="Geral" itemValue="CONTA" />
						<f:selectItem itemLabel="Salário" itemValue="SALARIO" />
					</h:selectOneMenu>
					
					<h:outputLabel value="Departamento: " />
					<h:selectOneMenu id="dpto"
						value="#{requisicaoTransferenciaBean.departamento}">
						<f:selectItem itemLabel="Almoxarifado" itemValue="ALMOXARIFADO" />
						<f:selectItem itemLabel="Consulta" itemValue="CONSULTA" />
						<f:selectItem itemLabel="Recursos Humanos" itemValue="RH" />
						<f:selectItem itemLabel="Outros" itemValue="OUTRO" />
					</h:selectOneMenu>
					
					<h:outputText value="Beneficiário: " />
					<h:selectOneMenu value="#{requisicaoTransferenciaBean.beneficiarioSelecionado}">
						<f:selectItem itemLabel="Selecione o Beneficiário" itemValue="" />
						<c:forEach var="beneficiario" items="#{requisicaoTransferenciaBean.beneficiarios}">
							<f:selectItem itemLabel="#{beneficiario.nome}" itemValue="#{beneficiario.id}" />
						</c:forEach>
					</h:selectOneMenu>
					
					<h:outputLabel value="Valor: " />
					<h:inputText value="#{requisicaoTransferenciaBean.transferencia.valor}" />
					
					<h:outputLabel value="Data Limite: " />
					<p:calendar value="#{requisicaoTransferenciaBean.dataLimite}" />
					
					<h:commandButton action="#{requisicaoTransferenciaBean.save}" value="Salvar" />
					<h:commandButton action="list.xhtml" value="Cancelar" />
					
				</h:panelGrid>
			</p:fieldset>
		</h:form>
	</ui:define>
</ui:composition>